# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCategory do
  @moduledoc """
  Advanced API Security provides security profile that scores the following categories.

  ## Attributes

  *   `abuse` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAbuse.t`, *default:* `nil`) - Checks for abuse, which includes any requests sent to the API for purposes other than what it is intended for, such as high volumes of requests, data scraping, and abuse related to authorization.
  *   `authorization` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAuthorization.t`, *default:* `nil`) - Checks to see if you have an authorization policy in place.
  *   `cors` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCORS.t`, *default:* `nil`) - Checks to see if you have CORS policy in place.
  *   `mediation` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMediation.t`, *default:* `nil`) - Checks to see if you have a mediation policy in place.
  *   `mtls` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMTLS.t`, *default:* `nil`) - Checks to see if you have configured mTLS for the target server.
  *   `threat` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigThreat.t`, *default:* `nil`) - Checks to see if you have a threat protection policy in place.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :abuse => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAbuse.t() | nil,
          :authorization =>
            GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAuthorization.t() | nil,
          :cors => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCORS.t() | nil,
          :mediation =>
            GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMediation.t() | nil,
          :mtls => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMTLS.t() | nil,
          :threat => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigThreat.t() | nil
        }

  field(:abuse, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAbuse)

  field(:authorization,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigAuthorization
  )

  field(:cors, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCORS)
  field(:mediation, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMediation)
  field(:mtls, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigMTLS)
  field(:threat, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigThreat)
end

defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCategory do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCategory.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ProfileConfigCategory do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
